/**
 * 
 */
package com.laozhao.deliveryManager.control;

import com.laozhao.deliveryManager.control.delivery.DelieverListControl;
import com.laozhao.deliveryManager.view.MainWindowsFrame;
import com.laozhao.deliveryManager.view.WelcomePanel;
import com.laozhao.deliveryManager.view.delivery.DeliverPanel;
import com.laozhao.dreamframe.util.FrameFactory;

/**
 * @author LaoZhao
 * 
 */
public class MainWindowsControl extends MainWindowsFrame {

//	private transient Logger log = LogManager.getLogger(this.getClass());

	/**
	 * 
	 */
	private static final long serialVersionUID = -5740621892025102206L;
	private WelcomePanel welcomePanel;
	private DeliverPanel deliverPanel;
	private DelieverListControl delieverListControl;
	/**
	 * 
	 */
	public MainWindowsControl() {
		super();
		initBeans();
		mainPane.addTab("送货单查询", delieverListControl);
		mainPane.addTab("送货单详细", deliverPanel);
		mainPane.addTab("关于", welcomePanel);		
		mainPane.setSelectedIndex(1);
	}
	

	private void initBeans() {
		welcomePanel =  FrameFactory.getInstance(WelcomePanel.class);
		deliverPanel = FrameFactory.getInstance(DeliverPanel.class);
		delieverListControl = FrameFactory.getInstance(DelieverListControl.class);
	}


//	public void actionPerformed(ActionEvent e) {		
//		String command = e.getActionCommand();
//		log.info("Main action start :" + command);
//		try {
//			
//			log.info("action success :" + command);
//		} catch (Exception exp) {
//			log.error("Failled action  :" + command);
//			log.debug("Failed message:", exp);
//			exp.printStackTrace();
//		}
////		System.gc();
//	}
}
